﻿<%@ Page Title="Transporte" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" 
    CodeBehind="TransporteCatalogo.aspx.cs" Inherits="uVirtualWeb.List.TransporteCatalogo" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">    
    <link href="/bootstrap/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <script src="http://code.jquery.com/jquery.js" type="text/jscript"></script>
    <script src="/bootstrap/bootstrap/js/bootstrap.min.js" type="text/jscript"></script>
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <h2>
        Transporte de Pessoas
    </h2>
    <p></p>
    <asp:UpdatePanel runat="server" ID="upVeiculos" UpdateMode="Conditional">
        <Triggers>
        </Triggers>
        <ContentTemplate>
            <asp:ListView runat="server" ID="lstVeiculos" ItemPlaceholderID="PlaceHolder1">
                <LayoutTemplate>
                    <table class="table table-bordered table-hover">
                        <asp:PlaceHolder runat="server" ID="PlaceHolder1">
                        </asp:PlaceHolder>
                        <asp:PlaceHolder runat="server" ID="PlaceHolder2">
                            <% while (cont % grade != 0)
                               {
                                   %>
                                   <td width="170px">
                                        <%--<center><asp:Image ImageUrl="" runat="server" ID="Image1" Width="150px" Height="100px"/></center>--%>
                                   </td>
                                   <%
                                   cont++;
                               }
                            %>
                        </asp:PlaceHolder>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <% if (cont % grade == 0)
                       {
                           if (cont != grade)
                           { %>
                             </tr> <%
                           }
                           %>
                           <tr>
                           <%
                       }
                       cont++;
                    %>
                    <td width="170px">
                        <center>
                        <asp:Image ImageUrl="http://images01.olx.com.br/ui/18/86/03/1376441999_536228303_1-Van-Escolar-Ducato-Minibus-29-lugares-Arthur-Alvim.jpg" runat="server" ID="Image1" Width="150px" Height="100px"/><br />
                        <asp:Label ID="Label5" runat="server"><%# Eval("VeiculoModelo.nome") %></asp:Label><br />
                        <asp:Label ID="Label6" runat="server">Acentos: <%# Eval("acentos") %></asp:Label><br />
                        <asp:Label ID="Label7" runat="server">Placa: <%# Eval("placa") %></asp:Label><br />
                        <asp:Label ID="Label8" runat="server">Notas: <%# Eval("observacao") %></asp:Label><br />
                        <%--<asp:Button CommandName="Detalhes" CommandArgument='<%# Eval("idVeiculo") %>' runat="server"
                            ID="btnDetalhes" CssClass="btn" Text="Detalhes" OnCommand="btnDetalhes_Click"/>--%>
                        <a href="#myModal" role="button" class="btn" data-toggle="modal">Detalhes</a>
                        </center>
                    </td>
                </ItemTemplate>
                <EmptyItemTemplate>
                    Não existem itens a serem listados.
                </EmptyItemTemplate>
            </asp:ListView>
        </ContentTemplate>
    </asp:UpdatePanel>

    <!-- Modal -->
    <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">Detalhes do Veículo</h3>
      </div>
      <div class="modal-body">
        <p>One fine body…</p>
      </div>
      <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">Fechar</button>
        <%--<button class="btn btn-primary">Fechar</button>--%>
      </div>
    </div>
    
    <script type="text/javascript">
        $("#menu_transporte").addClass("active");
    </script>
</asp:Content>
